import request from '@/utils/request'
// 列表
export const GetListAPI = params => {
  return request({
    url: '/production/group/list',
    method: 'GET',
    params
  })
}

// 新增
export const AddDataAPI = data => {
  return request({
    url: '/production/group/add',
    method: 'POST',
    data
  })
}

// 修改
export const EditDataAPI = data => {
  return request({
    url: '/production/group/edit',
    method: 'POST',
    data
  })
}

// 删除
export const DelDataAPI = data => {
  return request({
    url: '/production/group/delete/' + data,
    method: 'DELETE'
  })
}

// 是否启用
export const IsStartAPI = data => {
  return request({
    url: '/production/groupDetail/isStart',
    method: 'PUT',
    data
  })
}

// 列表
export const GetDetailListAPI = params => {
  return request({
    url: '/production/groupDetail/list',
    method: 'GET',
    params
  })
}

// 查看
export const GetDetailsAPI = data => {
  return request({
    url: '/production/group/view/' + data,
    method: 'GET'
  })
}

// 工厂日历下拉菜单
export const GetSelectShopCalendarAPI = data => {
  return request({
    url: '/scheduling/shopCalendar/selectShopCalendarList',
    method: 'GET'
  })
}

// 根据工厂日历id查询班组
export const GetSelectShiftCalendarAPI = params => {
  return request({
    url: '/scheduling/shopCalendar/selectShiftCalendarList',
    method: 'GET',
    params
  })
}

// 根据工厂日历id查询线别
export const GetSelectLineTypeCalendarAPI = params => {
  return request({
    url: '/scheduling/shopCalendar/selectLineTypeCalendarList',
    method: 'GET',
    params
  })
}

// 根据工厂日历id查询班别设置信息
export const GetSelectShiftSettingAPI = params => {
  return request({
    url: '/production/shopCalendar/selectShiftSettingList',
    method: 'GET',
    params
  })
}

// 获取用户
export const GetUserAPI = params => {
  return request({
    url: '/system/user/list',
    method: 'GET',
    params
  })
}

// 获取用户
export const GetTreeselectAPI = params => {
  return request({
    url: '/system/dept/treeselect',
    method: 'GET',
    params
  })
}
